<%@ page language="java" pageEncoding="UTF-8"%>
<!--  header -->
<%@ include file="../layouts/header.jsp"%>

<!--  body -->
<div class="Main">
<div class="Main_fix"><%@ include file="../layouts/left.jsp"%>

<script type="text/javascript">
			function remove(href,message){
				if(confirm(message)){
					window.location.href=href;
				}
			}
			
			var _list_table;
			j(document).ready(function(){
				 var uri="<j:uri controller="service" action="_list"/>";
				 _list_table=j("#content_table");
				 _list_table.reload(uri);
			}); 

			 
			var _delete_message="<div><br/>&nbsp;<fmt:message key="message.confirm.delete"/></div>";			 
			function deleteItem(itemId){
				j.window({id:'delete_confirm_'+itemId}).hide();
				var uri="<j:uri controller="service" action="_delete" type="js"/>?id="+itemId;
				j.getScript(uri);
			}

			function deleteItems(){
				j.window({id:'delete_all_confirm'}).hide();
				var formData=j('#list_form').serializeArray();
				
				j.ajax({url:"<j:uri controller="service" action="_delete_all" type="js"/>",data:formData,dataType:"script",type:"post"});
			}

			function saveItem(){
				j.post(j('#saveForm').attr('action'),
					   j('#saveForm').serializeArray(),
						function(msg){},
						"script"); 
			}
	 
	</script> <!-- main body -->
<div class="Main_body" id="Main_body">
<div class="Main_locationBar">
<div class="Main_locationBar_head"></div>
<div class="Main_locationBar_body"><span id="CurrentPosition"><fmt:message
	key="project.name" /> > Service</span></div>
<div class="Main_locationBar_foot"></div>
</div>

<div class="Main_bodyListBar">
<div class="Main_bodyListBar_head"><span>Service</span></div>

<div class="Main_bodyListBar_body" id='content_table'>
</div>
<div class="Main_bodyListBar_foot"></div>
</div>

<div class="Main_buttonGroupBar_body">
	<input type="button"
		class="bu tton" 
		value="<fmt:message key="form.button.new"/>"
		onclick="<j:jsw controller="service" action="_create" wid="create_service" title="Create Service"/>" />
	<input type="button"
		class="button"
		value="<fmt:message key="form.button.delete"/>"
		onclick="javascript:j.window({id:'delete_all_confirm',content:deleteMsg,confirm:true,width:'400px',height:'30px',callback:deleteItems}).show();"
		 />
</div>
<div id="createForm" style="display: none; color: red">this is
display form</div>
</div>
</div>
<!--  footer --> <%@ include file="../layouts/footer.jsp"%>